package com.future.lock.home.adapter;

import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.future.lock.R;
import com.future.lock.home.entity.bean.LockUser;

import java.util.List;

/**
 * Created by jniu on 2017/11/25.
 */

public class PeopleManageAdapter extends BaseQuickAdapter<LockUser,BaseViewHolder> {

    public PeopleManageAdapter(@LayoutRes int layoutResId, @Nullable List<LockUser> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, LockUser item) {
        helper.setText(R.id.tv_name,item.remark);
        switch (item.type) {
            case 0:
                helper.setText(R.id.tv_type,"指纹");
                break;
            case 1:
                helper.setText(R.id.tv_type,"密码");
                break;
            case 2:
                helper.setText(R.id.tv_type,"APP");
                break;
            case 4:
                helper.setText(R.id.tv_type,"卡片");
                break;
        }
    }
}
